﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Diploma.Models.CollaborationRoom>" %>
<%@ Import Namespace="ViewRes" %>
<div style="border-top: 1px solid #EEEEEE; padding: 5px 0 0 0;">
    <span>
    <span style="position: absolute; margin-left: -40px; margin-top: -10px;">
        <%
            if (Model.Student == null && Model.CollaborationProposes.Count != 0)
            {%>

    <%--<span>
            <ul style="list-style-type: none; display: inline;">
                <%foreach (var propose in Model.CollaborationProposes)
                  { %>
                <li>
                    <ul style="list-style-type: none;">
                        <li style="display: inline;">                        
                            <%: propose.Student.ToString() %> <%: propose.DateTime.ToString() %></li>
                        <li style="display: inline;">
                            <a href='<%:Url.RouteUrl("Default", new {controller="CollaborationRooms",action="Approve", roomId = Model.CollaborationRoomId, studentId= propose.Student.UserId})%>'>
                                <img class="smallIcon" src="<%: Url.Content("~/Content/Icons/job-done.png")%>" />
                            </a>
                        </li>
                    </ul>
                </li>
                <%} %>
            </ul>
        </span>--%>
    <a href="<%:Url.RouteUrl("Default",
                                               new
                                                   {
                                                       controller = "CollaborationRooms",
                                                       action = "Proposes",
                                                       id = Model.CollaborationRoomId
                                                   })%>" onclick=" getProposes(this.href); return false; ">
       <img class="mediumIcon" src="<%:Url.Content("~/Content/Icons/people.jpg")%>" style="width: 26px" title="<%:CollaborationRooms.StudentsforTheme%>" />
    </a>
        
        <%  }%>
    </span>
        <%
            if (Model.Student != null)
            {%>
       <%-- <ul style="list-style: none outside none; margin: 5px;display:inline;">
            <li style="display: inline;">--%><span class="smallgreentext">
                <%:Model.Student.ToString()%>
               <%:CollaborationRooms.PickedUpTheme%>
                <%:Model.Student.CollaborationPropos.DateApproved.ToString()%></span><%--</li>--%>
            <%--<li style="display: inline;"><span><a href='<%:Url.RouteUrl("Default", new {controller="CollaborationRooms",action="RefuseStudent", roomId = Model.CollaborationRoomId, studentId=Model.Student.UserId })%>'>
                <img src="<%: Url.Content("~/Content/Icons/delete.png")%>" class='smallIcon' /></a>
            </span></li>--%>
        <%--</ul>--%>
        <%
            }%>
    </span>
    
    <%
            Html.RenderPartial("~/Views/CollaborationRooms/ThemeControl.ascx", Model, ViewData);%>
    
    <ul style="text-align: right; list-style: none outside none; margin: 5px;">
        <li style="display: inline;"><span><a href='<%:Url.RouteUrl("Default",
                                           new
                                               {
                                                   controller = "CollaborationRooms",
                                                   action = "Edit",
                                                   id = Model.CollaborationRoomId
                                               })%>'>
            <img title='<%:SharedStrings.Edit%>' src="<%:Url.Content("~/Content/Icons/edit.png")%>" class='mediumIcon' /></a>
        </span></li>

        <%
            if (Model.Student == null)
            {%>
            <li style="display: inline;"><span><a href='<%:Url.RouteUrl("Default",
                                               new
                                                   {
                                                       controller = "CollaborationRooms",
                                                       action = "Delete",
                                                       id = Model.CollaborationRoomId
                                                   })%>'>
                <img title='<%:SharedStrings.Delete%>' src="<%:Url.Content("~/Content/Icons/delete.png")%>" class='mediumIcon' /></a>
            </span></li>
        <%
            }%>
    
    </ul>
</div>
